package chain;

public class ObstacleHandler extends SafetyHandler {
    @Override
    public void handle(String event) {
        if (event.contains("障碍物")) {
            System.out.println("[安全链] 紧急避障处理: " + event);
        } else if (nextHandler != null) {
            nextHandler.handle(event);
        }
    }
}
